package Entities;
// Generated Jun 21, 2009 1:07:04 PM by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * EnquetteVragen generated by hbm2java
 */
@Entity
@Table(name="enquette_vragen"
    ,catalog="pdlv2"
)
public class EnquetteVragen  implements java.io.Serializable {


     private Integer id;
     private Enquetes enquetes;
     private String vraag;
     private Set<AntwoordEnquetevragen> antwoordEnquetevragens = new HashSet<AntwoordEnquetevragen>(0);

     /**
      *
      */
     public EnquetteVragen() {
    }

     /**
      *
      * @param enquetes
      * @param vraag
      * @param antwoordEnquetevragens
      */
     public EnquetteVragen(Enquetes enquetes, String vraag, Set<AntwoordEnquetevragen> antwoordEnquetevragens) {
       this.enquetes = enquetes;
       this.vraag = vraag;
       this.antwoordEnquetevragens = antwoordEnquetevragens;
    }
   
    /**
     *
     * @return
     */
    @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="id", unique=true, nullable=false)
    public Integer getId() {
        return this.id;
    }
    
     /**
      *
      * @param id
      */
     public void setId(Integer id) {
        this.id = id;
    }
    /**
     *
     * @return
     */
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="enq_id")
    public Enquetes getEnquetes() {
        return this.enquetes;
    }
    
    /**
     *
     * @param enquetes
     */
    public void setEnquetes(Enquetes enquetes) {
        this.enquetes = enquetes;
    }
    
    /**
     *
     * @return
     */
    @Column(name="vraag", length=256)
    public String getVraag() {
        return this.vraag;
    }
    
    /**
     *
     * @param vraag
     */
    public void setVraag(String vraag) {
        this.vraag = vraag;
    }
    /**
     *
     * @return
     */
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="enquetteVragen")
    public Set<AntwoordEnquetevragen> getAntwoordEnquetevragens() {
        return this.antwoordEnquetevragens;
    }
    
    /**
     *
     * @param antwoordEnquetevragens
     */
    public void setAntwoordEnquetevragens(Set<AntwoordEnquetevragen> antwoordEnquetevragens) {
        this.antwoordEnquetevragens = antwoordEnquetevragens;
    }




}


